* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background-image: linear-gradient(0deg, rgba(247, 247, 247, 1) 23.8%, rgba(252, 221, 221, 1) 92%);
  font-family: 'Roboto Slab', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.music-container {
  margin: 100px 0;
  position: relative;
}

.controllers-containerr {
  display: flex;
  background-color: #fff;
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 20px 20px 0 rgba(252, 169, 169, 0.6);
  position: relative;
}

.img-container {
  position: relative;
  /* 撑开父级 */
  width: 110px;
}
/* 为了 after 的小白点 */
.img-container .img {
  width: 110px;
  height: 110px;
  position: absolute;
  bottom: 0;
  left: 0;
}
.img-container .img::after {
  content: '';
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.img-container .img img {
  border-radius: 50%;
  width: inherit;
  height: inherit;
  animation: rotate 3s linear infinite;
  animation-play-state: paused;
}
.music-container.play .img-container .img img {
  animation-play-state: running;
}
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.navigation {
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-btn {
  cursor: pointer;
  background-color: #fff;
  border: 0;
  color: #dfdbdf;
  font-size: 20px;
  padding: 10px;
  margin: 0 20px;
}
.action-btn.action-btn-big {
  color: #cdc2d0;
  font-size: 30px;
}
.action-btn:focus {
  outline: 0;
}

/* 好好看一下stacking context, 这里视觉效果还有bug */
/* 更新：因为还要有点击事件所以不能设置z-index: -1
   所以为了让它在card下面，就把card挪到了同级 */
.music-info {
  background-color: rgba(255, 255, 255, 0.5);
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  padding: 10px 10px 10px 150px;
  border-radius: 15px 15px 0 0;

  opacity: 0;
  transform: translateY(0%);
  transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}
.music-container.play .music-info {
  opacity: 1;
  transform: translateY(-100%);
}
.music-info h4 {
  margin: 0;
}

/* 进度条 */
.progress-container {
  cursor: pointer;
  background-color: #fff;
  border-radius: 5px;
  margin: 10px 0;
  width: 100%;
  height: 4px;
}
.progress {
  background-color: #fe8daa;
  border-radius: 5px;
  height: 100%;
  width: 0%;
  transition: width 0.1s linear;
}
